package com.intre.open.gwtjpa.data.first.client.service;

import java.util.List;

import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
import com.intre.open.gwtjpa.data.first.domain.Person;

/**
 * The client side stub for the RPC service.
 */
@RemoteServiceRelativePath("datafirstservice")
public interface DataFirstService extends RemoteService {
	
	/**
	 * Utility class for simplifying access to the instance of async service.
	 */
	public static class Util {
		private static DataFirstServiceAsync instance;
		public static DataFirstServiceAsync getInstance(){
			if (instance == null) {
				instance = (DataFirstServiceAsync) GWT.create(DataFirstService.class);
			}
			return instance;
		}
	}
	
	List<Person> getAll();
	
}
